﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BLL.Entities;

namespace BLL.Repositories
{
    public class SqlDbContext : DbContext
    {
        public SqlDbContext() : base("18bang")
        {
            Database.Log = s => Debug.WriteLine(s);
        }
        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Entity<User>();
            modelBuilder.Entity<Article>();
            modelBuilder.Entity<Contact>();
            modelBuilder.Entity<Log>();
            modelBuilder.Entity<MoneyTrade>();
            modelBuilder.Entity<Password>();
            modelBuilder.Entity<Plan>();
            modelBuilder.Entity<Profile>();

            base.OnModelCreating(modelBuilder);
        }
    }
}
